# # 输出信息
# '''
# print("BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
# print("BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
# print("BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
# print("BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
# print("BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
# '''
#
# # 给这些信息起一个名字  变量名  变量
# """
# A = "BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
# print(A)
# print(A)
# print(A)
# print(A)
# print(A)
# print(A)
# print(A)
# print(A)
# print(A)
# """
#
# # 循环  根据条件重复的去做事情
# A = "BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
# # 打印10次变量A
# i = 1
# while i < 101:
#     print(A)
#     i += 1
# """
# 语法:
# while 条件表达式:
#     条件成立执行的代码块(循环体)
# """
# # 循环输出1到10的数字
# # 定义计数器
# i = 1
# # 循环
# while i <= 3:
#     # 计算累加
#     print(i)
#     i += 1
# # TODO 2.求解 1-100 的和
# ok = 0
# i = 1
# while i <=100:
#     ok += i
#     i += 1
# print(ok)
# 'TODO 2.求解 1-100 奇数和'
# ok = 0
# i = 1
# while i <= 100:
#     if i % 2 == 1:
#         ok += i
#     i += 1
# print(ok)
# # 循环5次, 当循环到i = 3的时候,退出整个循环
# i = 1
# while i <= 5:
#     if i == 3:
#         break
#
#     print(i)
#     i += 1
# 案例: 吃5个苹果,当吃到第3个的时候,发现有虫子.就不吃第三个了.剩下的继续吃.
# i = 1
# while i <= 5:
#     if i == 3:
#         i += 1
#         continue
#     print(f'我要吃第{i}个苹果')
#     i += 1
# while True:
#     print('热干面')
#
#
# while 1:
#     print(1)
#
# while 1 == 1:
#     print(1)
# 1 2 3
# 1 2 3
# 1 2 3
# i = 1
# while i <= 3:
#     j = 1
#     while j <= 3:
#         print(j, end=" ")
#         j += 1
#     print()
#     i += 1
# 打印‘*’正方形, 使用循环嵌套
# i = 1
# while i <= 5:
#     j = 1
#     while j <= 5:
#         print('*', end=' ')
#         j += 1
#     print()
#     i += 1
'打印三角形'
i = 1
# while i <= 5:
#     j = 1
#     while j <= i:
#         print('*', end=" ")
#         j += 1
#     print()
#
#     i += 1
# 99乘法表
# while i <= 9:
#     j = 1
#     while j <= i:
#         print(f'{i} * {j} ={i * j}', end='\t')
#         j += 1
#     print()
#     i += 1
# while i <= 9:
#     j = 1
#     while j <= i:
#         print(f'{i} * {j} = {i * j}', end='\t')
#         j += 1
#     print()
#     i += 1
# # TODO 没有break的情况
# i = 1
# while i <= 3:
#     print(i)
#     i += 1
# else:
#     print('else执行了')
#
# # TODO 有break的情况
# i = 1
# while i <= 3:
#     if i == 2:
#         break
#     print(i)
#     i += 1
# else:
#     print('else执行')
# TODO del 通用的语法, 可以用来删除变量
list1 = ['python', 'java', 'javascript', 'golang']
del list1[0]
print(list1)

# TODO remove 删除第一个出现的指定数据
list2 = ['python', 'java', 'javascript', 'golang', 'python']
list2.remove('python')
print(list2)


# TODO pop 指定索引删除数据,如果没有指定那么就删除列表的末尾的数据  弹出
list3 = ['python', 'java', 'javascript', 'golang', 'python']
# 1 不指定索引
item = list3.pop()
print(list3)
print(item)

# 2 指定索引
list3.pop(0)
print(list3)


# TODO clear 清空列表
list3.clear()
print(list3)











